<?php $this->headScript()->appendFile($this->JS_PATH . 'form_lead.js'); ?>
<link rel="stylesheet" href="<?php echo $this->CSS_PATH ?>main.css">
<div id="lead-listing"></div>
<div class="content">
    <div class="page-title"> <i class="icon-custom-right"></i>
        <h3><span class="semi-bold"><?php echo $this->mode;?> Lead</span></h3>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="grid simple">
                <div class="grid-title"></div>
                <div class="grid-body ">
                    <div class="row">
						<?php if (count($this->errorMessageArray) > 0): ?>
                            <div class="alert alert-error">
                                <?php foreach ($this->errorMessageArray as $erroValue): ?>
                                    <div class="text-left">
                                        <i class="icon-remove-sign"></i>
                                        <?php echo $erroValue; ?>
                                    </div>
                                <?php endforeach; ?>
                            </div>
                        <?php endif; ?>

                   
						<form role="form"  id="lead-form" name="lead-form"  enctype="multipart/form-data"  action="" method="post">
						   
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Lead Name</label>
									<?php echo $this->form->lead_name; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Main Status</label>
									<?php echo $this->form->lead_main_status; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Contact Name</label>
									<?php echo $this->form->lead_contact_name ; ?>
								</div>
							</div> 
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Currency</label>
									<?php echo $this->form->lead_currency; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Opportunity</label>
									<?php echo $this->form->lead_opportunity; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Source</label>
									<?php echo $this->form->lead_source; ?>
								</div>
								
							</div>			

							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Source Description</label>
									<?php echo $this->form->lead_source_description; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Description</label>
									<?php echo $this->form->lead_description; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">&nbsp;</label>
									<?php 
										$checked = "";
										if ($this->lead_available_to_all == 1) {
										  $checked = "checked";
										} 
									?>
									<label>
										<input type="checkbox" name="lead_available_to_all" <?php echo $checked;?> value="1">&nbsp; Lead available to All
									</label>
								</div>
							</div> 
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">First Name</label>
									<?php echo $this->form->lead_firstname; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Middle Name</label>
									<?php echo $this->form->lead_middlename; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Last Name</label>
									<?php echo $this->form->lead_lastname; ?>
								</div>
							</div> 

							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Date of Birth</label>
									<div class="input-append success date ">
										<?php echo $this->form->lead_dob; ?>
										<span class="add-on"><span class="arrow"></span><i class="fa fa-th"></i></span>
									</div>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Email</label>
									<?php echo $this->form->lead_email; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Phone no.</label>
									<?php echo $this->form->lead_phone; ?>
								</div>
							</div> 
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Site</label>
									<?php echo $this->form->lead_site; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Company Name</label>
									<?php echo $this->form->lead_company_name; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Position</label>
									<?php echo $this->form->lead_position; ?>
								</div>
							</div>
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Adress1</label>
									<?php echo $this->form->lead_adrline1; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Adress2</label>
									<?php echo $this->form->lead_adrline2; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Adress3</label>
									<?php echo $this->form->lead_adrline3; ?>
								</div>
							</div>
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Street</label>
									<?php echo $this->form->lead_street; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Postal</label>
									<?php echo $this->form->lead_postal; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">City</label>
									<?php echo $this->form->lead_city; ?>
								</div>
							</div>
							
							<div class="row form-row">
								<div class="col-md-3">
									<label class="form-label">Country</label>
									<?php echo $this->form->lead_country; ?>
								</div>
								
								<div class="col-md-3">
									<label class="form-label">Comment</label>
									<?php echo $this->form->lead_comment; ?>
								</div>
							
								<div class="col-md-3">
									<label class="form-label">Status</label>
									<?php echo $this->form->lead_status; ?>
								</div>
							</div>

							<div class="col-md-6">
								<?php if ($this->mode == 'Edit'): ?>
									<input type="submit" value="Update" class="submitfrmbtn btn btn-primary" name="Update"/>
								<?php else: ?>
									<input type="submit" value="Submit" class="submitfrmbtn   btn btn-primary" name="Submit"/>
								<?php endif; ?>
									<a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'lead', 'action' => 'form'), null, TRUE); ?>" class="btn btn-default"/>
										Cancel
									</a>
							</div>
						</form>
					</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- END PAGE -->  